<template>
  <a-card :bordered="false">
    <div>
      <a-form @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :md="12" :sm="12">
            <a-form-item label="邮箱" :label-col="labelCol" :wrapper-col="wrapperCol">
              <a-input v-model="queryParam.email" placeholder="请输入邮箱" />
            </a-form-item>
            <a-form-item label="姓名" :label-col="labelCol" :wrapper-col="wrapperCol">
              <a-input v-model="queryParam.name" placeholder="请输入姓名" />
            </a-form-item>
            <a-form-item label="手机号" :label-col="labelCol" :wrapper-col="wrapperCol">
              <a-input v-model="queryParam.mobile" placeholder="请输入手机号" />
            </a-form-item>
          </a-col>
          <a-col :md="12" :sm="8">
            <a-form-item>
              <a-button type="primary" icon="search" @click="searchQuery()">查询</a-button>
              <a-button type="primary" icon="reload" style="margin-left: 8px" @click="searchReset()">重置</a-button>
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <vxe-grid
        id="TesteeList"
        ref="vxeTable"
        :row-config="{keyField:'id'}"
        v-bind="options"
        v-on="listeners"
    >
      <template #action="{ row }">
        <a @click="handleDetail(row)">详情</a>
      </template>
    </vxe-grid>
    <TesteeModal @ok="modalFormOk" ref="modalForm" />
  </a-card>
</template>

<script>
import { VxeTableMixin } from '@/mixins/VxeTableMixin'
import ZDictSelectTag from '@/components/dict/ZDictSelectTag'
import TesteeModal from './modules/TesteeModal'
import {getAction} from "@/services/manage";
export default {
  name: 'TesteeList',
  mixins: [VxeTableMixin],
  components: {
    TesteeModal,
    ZDictSelectTag
  },
  data() {
    return {
      columns: [
        {type: 'checkbox', width: 40, fixed: 'left'},
        {type: 'seq', width: 40, fixed: 'left'},
        {title: '邮箱', field: 'email',width: 250},
        {title: '姓名', field: 'name',width: 200},
        {title: '手机号', field: 'mobile',width: 150},
        {title: '性别', field: 'gender', formatter: 'dictText',width: 100},
        {title: '出生日期', field: 'birthday',width: 150},
        {title: '毕业时间', field: 'graduationDate',width: 150},
        {title: '毕业院校', field: 'graduationSchool',width: 300},
        {title: '专业', field: 'major',width: 200},
        {title: '操作', field: 'operation', width: 60, fixed: 'right', slots: {default: 'action'}}
      ],
      url: {
        list: '/assessment/testee/v1/page'
      },
      customTableToolbar: {
        buttons: [
        ]
      }
    }
  }
}
</script>
